#Canny边缘提取
import cv2 as cv
from superposition import superPosition

src = cv.imread('/Users/vine/Documents/Winglab/ISPTestCode/testPic/Clip/2021091120354001191G-CL0615-6.jpg')
# cv.imwrite('/Users/vine/Desktop/init.jpg',src)
blurred = cv.GaussianBlur(src, (3, 3), 0)
gray = cv.cvtColor(blurred, cv.COLOR_RGB2GRAY)
edge_output = cv.Canny(gray, 200, 230)
cv.imwrite('/Users/vine/Desktop/Canny.jpg',edge_output)

# # 将原图中的轮廓标出来
# dst = cv.bitwise_and(src, src, mask= edge_output)
# cv.imwrite('/Users/vine/Desktop/Color.jpg',dst)

img = superPosition(edge_output, src)
cv.imwrite('/Users/vine/Desktop/res.jpg',img)
